package Fac;

public class GeneralSwitchFacade {
    private Light light[ ] = new Light[4];
    private Fan fan;
    private AirConditiner ac;
    private Television tv;

    public GeneralSwitchFacade(){
        light[0]=new Light("左前");
        light[1]=new Light("右前");
        light[2]=new Light("左后");
        light[3]=new Light("右后");
        fan=new Fan();
        ac=new AirConditioner();
        tv=new Televison();
    }

    public void on(){
        lights[0].on();
        lights[1].on();
        lights[2].on();
        lights[3].on();
        fan.on();
        ac.on();
        tv.on();
    }
}